package com.mikhailenko.transportMVC.repository.es;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.mikhailenko.transportMVC.model.es.RuleDB;

public interface RuleRepository extends JpaRepository<RuleDB, Integer> {
	
	@Query("SELECT rule FROM rules rule WHERE rule.block.id = :id ")
    List<RuleDB> findByBlockId(@Param("id") int id);
}
